package com.example.database.demo.pojo.SFPojo.responseData;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.io.IOException;

/**
 * @author xionglin
 */
@Data
public class ApiResultData{
    private Boolean success;
    private String errorCode;
    private String errorMessage	;
    private String requestId	;
    private FileInfo obj	;
    private String errorMsg;
    private MsgData msgData;
    public ApiResultData(String jsonString) throws IOException {
        ObjectMapper objectMapper = new ObjectMapper();
        ApiResultData data = objectMapper.readValue(jsonString, ApiResultData.class);
        this.success = data.success;
        this.errorCode = data.errorCode;
        this.errorMessage = data.errorMessage;
        this.requestId = data.requestId;
        this.obj = data.obj;
        this.errorMsg = data.errorMsg;
        this.msgData = data.msgData;
    }

    public ApiResultData() {
    }
}
